<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="css/login.css" type="text/css"/>
<script type="text/javascript" src="control/dangnhap.js"></script>
<script type="text/javascript" src="model/taikhoan.js"></script>
<script type="text/javascript">
function dangnhap(form){
    //var controller = Dangnhap.kiemtra(ten);
    //document.write("<script type='text/javascript' src='control/dangnhap.js'></scr"+"ipt>");
    var controller = new Dangnhap;
    //controller.login(form.TEN.value, form.MATKHAU.value);
    var result= controller.kiemtra(form.TEN.value, form.MATKHAU.value);
    
    if(result == true){
        document.write("Dang nhap thanh cong");
        window.open("quanly.html", "_self");
    }
    else
    {
        document.write("Dang nhap that bai");
        window.open("index.html", "_self");
    }
    
}
</script>
</head>

<body>
<form id="login" action="none" name="DANG_NHAP">
    <h1 id="ff-proof" class="ribbon">Money Manger &nbsp;&nbsp;</h1>
    <div class="apple">
    	<div class="top"><span></span></div>
    	<div class="butt"><span></span></div>
    	<div class="bite"></div>
	</div>
    <fieldset id="inputs">
        <input id="username" type="text" onblur="if(this.value=='')this.value='Pseudo ID';" onfocus="if(this.value=='ten')this.value='';" value="Tên" name="TEN" />
        <input id="password" type="password" onblur="if(this.value=='')this.value='Mot de passe';" onfocus="if(this.value=='matkhau')this.value='';" value="Mật khẩu" name="MATKHAU" />
    </fieldset>
    <fieldset id="actions">
        <input type="button" id="submit" onclick="dangnhap(DANG_NHAP)"  value="Đăng Nhập"/>
       <p class="option"><a href="#">Đăng ký</a>&nbsp;&nbsp;|<a href="#">Quên mật khẩu</a></p>
    </fieldset>
</form>
</body>
</html>
